package config

import (
	"github.com/spf13/viper"
	"k8s.io/client-go/kubernetes"
)

const (
	TimeFormat                    string = "2006-01-01 15:01:05"
	ClusterConfigSecretLabelKey   string = "kubeasy.comf/cluster.metadata"
	ClusterConfigSecretLabelValue string = "true"
)

var (
	MetadataNamespace  string
	InClusterClientSet *kubernetes.Clientset
	ClusterKubeconfig  map[string]string
)

type ReturnData struct {
	Status  int                    `json:"status"`
	Message string                 `json:"message"`
	Data    map[string]interface{} `json:"data"`
}

func init() {
	viper.SetDefault("METADATA_NAMESPACE", "krm")
	MetadataNamespace = viper.GetString("METADATA_NAMESPACE")
}
